<!--
   This software is licensed under the MIT License. See the license file for details.
   Source: https://github.com/spacehuhntech/WiFiDuck
-->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
        <meta name="theme-color" content="#36393E">

        <meta name="description" content="WiFi Duck">
        <title>WiFi Duck | Settings</title>

        <link rel="stylesheet" type="text/css" href="style.css">
        <script src="script.js"></script>
        <script src="settings.js"></script>
    </head>
  	<body>
        <nav>
            <ul class="menu">
                <li><a href="index.html">WiFi Duck</a></li>
                <li><a href="settings.html">Settings</a></li>
                <li><a href="terminal.html">Terminal</a></li>
                <li><a href="credits.html">About</a></li>
            </ul>
        </nav>
		<div id="status"></div>
		<main>
			<section>
				<h1>WiFi</h1>
				<p>Restart the device to apply new settings.</p>
				<table>
				<tr>
					<td>SSID:</td>
					<td id="ssid"></td>
					<td><button class="primary" id="edit_ssid">edit</button></td>
				</tr>
				<tr>
					<td>Password:</td>
					<td id="password"></td>
					<td><button class="primary" id="edit_password">edit</button></td>
				</tr>
				<tr>
					<td>Channel:</td>
					<td id="channel"></td>
					<td><button class="primary" id="edit_channel">edit</button></td>
				</tr>
				<tr>
					<td>Autorun Script:</td>
					<td id="autorun"></td>
					<td><button class="warn" id="disable_autorun">disable</button></td>
				</tr>
				</table>
				<button class="danger" id="reset">Reset settings</button>
			</section>
			<section>
				<h1>Update</h1>

				<p>
					Go to <a href="https://github.com/spacehuhntech/WiFiDuck/releases" target="_blank">wifiduck.com/releases</a>
					to check for updates.<br>Select a .bin file and press upload to update the device.<br>
				</p>

				<form method='POST' action='/update' enctype='multipart/form-data'>
				<input type='file' name='update'>
				<input type='submit' class="warn" value='Upload'>
				</form>
			</section>
			<footer>
				<a href="https://github.com/spacehuhntech/WiFiDuck" target="_blank">Source</a>
				<br><br>
				<span id="version"></span><br>
				Copyright (c) 2021 Spacehuhn Technologies<br>
				<a href="https://spacehuhn.com" target="_blank">spacehuhn.com</a>
			</footer>
	</body>
</html>